package org.testing.model.questions;

import org.testing.model.InOutManager;
import org.testing.model.correctQuestionAnswers.CorrectAnswer;
import org.testing.model.results.DoubleResult;
import org.testing.model.results.Result;
import org.testing.model.userAnswers.OneLineMultipleUserAnswer;
import org.testing.model.userAnswers.UserAnswer;

public class MultiAnswerQuestion extends MultiLineVariantQuestion {
	public MultiAnswerQuestion(String bodyText, CorrectAnswer correctAnswer) {
		super(bodyText, correctAnswer);
	}

	@Override
	public  UserAnswer readUserAnswer(InOutManager inOut) {
		return new OneLineMultipleUserAnswer(inOut.inPutLine());
		
	}

	@Override
	public Result check(UserAnswer userAnswer) {
		return new DoubleResult(this.correctAnswer.equals(userAnswer));
	}
	
	



}
